package SingletonDemo.example;

/**
 * @author zsh
 * @Description
 * @create 2022-05-13 19:29
 */
public class Main {
    public static void main(String[] args) {
        System.out.println("start---");
        SingletonDemo s1 = SingletonDemo.getInstance();
        SingletonDemo s2 = SingletonDemo.getInstance();

        if (s1 == s2){
            System.out.println("是同一实例");
        }else {
            System.out.println("不是同一实例");
        }

        System.out.println("end---");
    }
}
